[CakePHP] what is the aim to declare $name in each controller

Posted by kwokwai on Stack Overflow See other posts from Stack Overflow or by kwokwai
Published on 2010-05-12T17:37:51Z Indexed on 2010/05/12 19:34 UTC
Read the original article Hit count: 280

Filed under:

Hi all,

I am leaning cakePHP.
I noticed that a variable $name is declared in each Controller.
What is its purpose?
Is it referring to the name of table Sites?

<?php
class SitesController extends AppController { 
var $name = 'Sites';
...
}
?>

If yes, Can users refer to more than one table like this?
var $name = 'Sites', 'Sites2', 'Sites3';

© Stack Overflow or respective owner

Related posts about cakephp